package com.comparator.comparator1;

public class Employee implements Comparable {
private int eid;
private String ename;
private int age;
private double salary;
public Employee(int eid,String ename,int age,double salary){
	this.eid=eid;
	this.ename=ename;
	this.age=age;
	this.salary=salary;
}
public int getEid() {
	return eid;
}
public void setEid(int eid) {
	this.eid = eid;
}
public String getEname() {
	return ename;
}
public void setEname(String ename) {
	this.ename = ename;
}
public int getAge() {
	return age;
}
public void setAge(int age) {
	this.age = age;
}
public double getSalary() {
	return salary;
}
public void setSalary(double salary) {
	this.salary = salary;
}
public String toString(){
	return eid+"\t"+ename+"\t"+age+"\t"+salary;
}
@Override
public int compareTo(Object o) {
	Employee emp=(Employee)o;
	return this.eid-emp.eid;
}
}
